﻿using System;
using System.Web;
using com.wei8808.utility;

namespace com.wei8808.system
{
    public class Global : HttpApplication
    {
        private System.ComponentModel.IContainer components = null;

        public Global()
        {
            InitializeComponent();
        }
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
        }
        protected void Application_Start(object sender, EventArgs e)
        {
            EventsLog.SetConfig();
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }


        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
            var objExp = HttpContext.Current.Server.GetLastError();
            EventsLog.WriteLog("\r\n客户机IP:" + Request.UserHostAddress + "\r\n错误地址:" + Request.Url + "\r\n异常信息:" + Server.GetLastError().Message, objExp);
        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}